﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LinkedListBasic
{
    //Structure in C Language
    class StructFuction
    {
        public int Data;
        public int Data2;
        public StructFuction Vendor;
    };
    class BaseClass
    {
        //Create Fuction or Medthod
        //public int First;
        //StructFuction HeadVendor;
        public BaseClass()
        {
         
            Head = null;

        }
        public StructFuction Head;
        private int size;

        public int AddVlaue(StructFuction NewItem)
        {
            StructFuction Tempadd = new StructFuction();
            Tempadd = NewItem;           
            Tempadd.Vendor = Head;
            Head = Tempadd;
            return size++;

        }
        public int count
        {
            get
            {
                return size;
            }
        }
        public StructFuction Show(int position)
        {
            StructFuction Tempshow = Head;
            for (int i = 0; i < position && Tempshow != null; i++)
            {
        //        Tempshow = HeadVendor.Vendor;
            }
            return Tempshow;
        }


    }
    class Program
    {
        static int Main(string[] args)
        {
            BaseClass Edit = new BaseClass();
            StructFuction Join = new StructFuction();
            Join.Data = 700;
            Join.Data2 = 600;
            Edit.AddVlaue(Join);

            Console.WriteLine("The number of Records:{0}", Edit.count);
            for (int i = 0; i < Edit.count; i++)
            {
                StructFuction Showed = Edit.Show(i);
                Console.WriteLine("\nThe number of Records:{0}", Showed.Data);
                Console.WriteLine("\nThe number of Records:{0}", Showed.Data2);
                Console.ReadKey();
            }

            return 0;
        }

    }
}